folditfandomcom-20200222-history
Multiple Foldit Clients
Foldit allows you to run as many clients as you want on as many computers as you want. You can also run multiple clients on a single computer. A Foldit client can be "CPU intensive", meaning that it can use 100% of one CPU or processor. Most computers now have more than one processor. This means the ability to run more than one client at full speed. Typical computers might have 2, 4, or 8 processors, and high-end computers have more. See the technobabble section below for more on the terminology. See "how many CPUs?" for tips on determining the number of processors in the Windows environment (or in the Linux illustration bellow). In general, you run multiple Foldit clients from a single installation of Foldit, as described on this page. See "Foldit Multi Client" for a discussion of using multiple copies of Foldit on Windows. With a single installation running multiple Foldit clients, "tracks" are an important way of keeping things straight. See the Tracks page for further information. General considerations for running multiple clients In general, leaving one processor idle should be enough to keep your computer usable for other routine tasks. So a four-processor system should be able to run three Foldit clients comfortably. (OK, you can run four in an emergency.) You can run more Foldit clients than you have processors, but they'll run much more slowly. Also, you'll probably run into problems if you want to use the computer for something else. Foldit is usually not very memory-intensive. Having 2 GB of memory (RAM) per processor is plenty, 1 GB per processor would probably be fine. (If you decide to run 21 clients on a 2-processor machine, that's a different story.) If the Foldit window is "up" on the screen, it uses more processor power. This discussion assumes that you'll be keeping your windows down or minimized most of the time, running Lua recipes. Running GUI recipes requires leaving the client window "up", and takes up essentially twice the processing power, so (nearly) two processors instead of just one. Even leaving an idle Foldit client window "up" can consume around 100% of one processor. Only one Foldit can be connected to IRC chat at a time. You can create a second Foldit user id and use that to connect from an external IRC client if desired. Multiple clients on Windows If you are using Windows as your OS, then all you need to do is click on your icon again to open another client. You only need to have one Foldit program installation. To use Windows with multiple clients and still useful with other applications running - modify Foldit-Icon-Target to: C:\WINDOWS\system32\cmd.exe /c start /BELOWNORMAL "" "C:\Foldit\Foldit.exe" Caveats: your second or third client will not join in-game chat. Also, it's always good practice to save a good score before closing a client. And - do not run the same recipe on the same Track on multiple clients generated this way - if you close the highest scoring client without saving - you will not be able to access that score. A special note on using scripts in multiple clients; Each client loads the last saved copy of the all.macro file in the foldit installation directory upon starting. If you download new scripts from the website (which is only possible in a client with chat enabled) those scripts will not be available in other clients until you exit that chat client and the current all.macro file is overwritten by the exiting client. Already opened clients will not show the new scripts. You need to open a new client to see the scripts you downloaded from the website. Keep in mind that clients you close after closing a chat client will overwrite the new downloaded and saved scripts. It is good practice to make regular backups of the all.macro file. Multiple clients on Mac It's not that simple for Mac users (see next topic if you are using Mac OS Sierra)* - many Mac users install multiple copies of the Foldit program, but that does require some housekeeping to keep your Tracks and scores across the different copies of the program. There is a way to set up the ability to run multiple clients from just one Foldit program. It will take a few minutes to set up, but after the initial setup, it works just as easily as the Windows people have it. Go to Applications -> Automator Choose Workflow Double click on Run Shell Script Leave Shell settings at "/bin/bash" - and leave Pass Input settings at "to stdin" Delete the "cat" in the input box. Add the following two lines exactly as follows (on two separate lines as shown): cd /Applications open -n foldit.app Click the "Run" button at top right of window… and another client will open for you, complete with your cookbook up to date, and your puzzles exactly as you have left them in client you were already running. You can open any number of clients by simply clicking that button. If you duplicate Automator to your desktop, it's handy to be able to open clients directly from there (as you can see if you examine the picture, renaming it for the desktop is fine). The Shell Script will stay in the program, so you do not need to retype the script after the first time. Caveats: your second or third client will not join in-game chat. Also, it's always good practice to save a good score before closing a client. And - do not run the same recipe on the same Track on multiple clients generated this way - if you close the highest scoring client without saving - you will not be able to access that score. *Multiple Clients in Mac OS Sierra (10.12.3) In Sierra, you can run multiple copies of Foldit clients two ways: The Automator way described above, or as separate, multiple, uniquely-named copies of the game. As long as you have sufficient hard drive space, (during gameplay you will be running multiple, separate copies of the game clients, each one about 480 megs) this is easily set up. Why would you want to do this? Because each client has its own separate log.txt file, in case something goes wrong... then you will not need to shut down all other clients to send a report to feedback. And because this makes sense! :-) Running five separate unique clients doesn't appear to use any more CPU power than the Automator way... runs just the same - and it's handy to be able to launch the clients from the dock instead of running Automator. Note: 1 main difference other than the above info is that if you want to play a solution from one copy of the game in another copy, you will need to save and share it with yourself to see it in the other copies of the game. Once you get accustomed to doing that, the benefit (not having to close all clients in case something goes wrong and you need to post feedback... and having separate log.txt and script log files for crash reporting) outweighs the new workflow routine. And saving/sharing good/interesting solutions with yourself is also "insurance" in the event of a client meltdown. Start with a Foldit client set up like you want it. a.) Color scheme is set as you like it and b.) desired recipes are in place. If you want to run your current client and it is set up with your desired color scheme and recipes you're ready for the next step. If you want to "start over" with a completely fresh client, but want to keep your settings for color scheme and recipes, copy the 'options.txt' and 'all.macro' files out of the old client folder (right-click on your old client, select "View Contents"-> Click "Contents' Folder-->Open Resources Folder and copy these two files out before you begin. As a best practice save a copy of the desired 'options.txt' and 'all.macro' files to your Mac user Documents Folder in order to copy and paste them into a new client. NOTE: Copy one at a time into (as well as out of) the Documents folder and one at a time out of the Documents folder and into foldit's Resources folder. ...as I discovered the hard way, for whatever reason selecting and copying both of those files and pasting them into Resources folder will only result in the 'options.txt' actually pasting. A best practice is to compress an old folder (in case you need to pull puzzle files out of it later) rather than keeping it in the applications folder - to do this, close the game if you have the old client launched, then right-click the old game folder and select 'Compress "Foldit"' Name the new archive or leave it default. Once you download and install the fresh client, right-click on the Foldit folder, select "View Contents"-> Click "Contents' Folder so that you can see the 'Resources' folder, and drag the 'options.txt' and 'all.macro' files on top of the new client 'Resources' folder to paste them into it. (This avoids you having to do this after you make duplicate clients.) TIP: If you run both Main and Developer Preview versions of the game, make sure that you have both the 'options.txt' file for Main and the 'options.txt' file for Devprev copied (into your main Mac user Documents folder) before you continue. # If this is a new first folder, you can leave it as is or rename the new Foldit client, by right-clicking on the Foldit folder icon and selecting 'Rename" - I recommend naming it Foldit-1. # Right-click the renamed folder and select 'copy' to make as many copies of the Foldit clients as you wish (using the guidelines in "General considerations for running multiple clients" above). For example, a Mac with a 4-core processor (4 ghz i7 intel core) can actually run up to 7 clients because there are 8 logical processors, one reserved. This doesn't mean it would be wise to run all 7, but possible). # Rename the copied folders as above, 'Foldit-2, Foldit-3, Foldit-4" etc. If you wish to run a client or two as Devprev, you should designate in the name for the folder(s) 'Foldit-1D' ... and drag your Devprev 'options.txt' into the Resources folder for the new Devprev client. Naming folders: (what you name your folders is up to you, it will not affect play *unless you use "illegal" characters in your folder name. The game file inside the folder will run independently as "Foldit"; all your log.txt, and other files will stay with the copied client folder) # Move all of the new game clients into your Mac's Application folder. <- MUST do this or Foldit will not launch! Update: The downloaded installation file for Foldit for Mac now includes a typical "drag to Application" method, so if you're installing a newly uploaded client, all your copies will be made in the Application folder. # Launch Foldit-1 (or whatever you named your first client). When the game icon appears on your dock, right-click the icon in the dock and select 'Keep in dock'. This will allow you to launch the client from your dock if you close it. # Repeat renaming, launching, and clicking "keep in dock" for all your copied clients. # Notice that when you hover the mouse over the dock foldit icons, the new client name shows in a bubble above it. # GAMEPLAY NAMING TIP: To keep it straight when playing multiple clients, name your game track or game save with an indicator of which client it's running in, for example F1-Puzzle#, F2-####, etc.. Multiple clients on Linux (ubuntu 16.04 LTS) Every time you double-click on the Foldit Application Icon in the Foldit Folder, you open an additionnal client. The maximum number of clients you can run in parallel depends on your computer. There are several ways to find the optimal number of clients allowed (many clients in parallel allow you to use one track per client, meaning several tracks for the same puzzle and/or several puzzles). First, when too many clients are running with recipes, you'll notice a slowing down of all clients. Close clients untill everything runs right. A second way to find the right number is to count the number of cores n of your machine, and to run n-1 client (one core is still needed for system stuffs). A third, optimal way, is to open the task manager (e.g. MATE System Monitor). This allows you to look on possible limits, that can be the CPUs (number of cores or processors) or the RAM. On the example of the illustration, the computer has 8 cores (virtual processors or CPUs). Only 6 clients are runnning but we see that all CPUs are used at more than 90% (all to 100% would be too much). The memory use is about 75% of the available RAM, which is ok (you can go till 90%). In this case, opening a 7th client would ask too much to the computer (all processes would be slowed down). This because these are heavy puzzles with many residues. Small puzzles allow opening more clients. I's possible that, after days of running, the memory use becomes higher and higher. In order to reduce the memory use, it's better to close the clients from time to time (for example after a puzzle expired). Technobabble "CPU" is an old term for "central processing unit", from back in the day when the CPU was a giant metal cabinet in the computer room that used enough electricity to power a small city. However, since the introduction of the integrated transistors and their subsequent shrinking to micrometer sizes (and later nanometer), all of those capabilities have been made to fit into a single chip that is now not much bigger than your thumbnail. As for the why the term is still used in regards to the currently available products, that simply comes down to still being central (ie 'main') processing unit inside out computers. It used to be that a CPU could do only one thing at a time, meaning one step of one program. Eventually, the nerds figured out ways to switch back and forth between different programs, but only one program was really running at a given time. Early PCs were the same way. It used to be that one microprocessor chip contained one CPU which could still only do one thing at time. There were, and still are, also computers with multiple CPUs and feature 2, 4, or even 8 individual chips (this is called Symmetrical Multi-Processing or SMP for short''). As a result these systems were thus capable of running that many individual programs at once, 'or 'if programmed in a specific way, could make use of their combined processing power to complete a task much quicker. Such programs were deemed to be "multi-threaded", as apposed to most software of the time which was "single threaded", denoting that regardless of how many CPUs were in a computer it would only be capable of utilizing one of them at a time. New microprocessors now have multiple "logical processors". The term "core" is sometimes used, which was accurate at one point, but newer Intel and AMD microprocessors have multiple cores capable of executing multiple threads (and is no longer called SMP, but is now SM'T', or ''Simultaneous MultiThreading). As an example a microprocessor may have four cores (aka a 'quad core') with two threads each, giving it a total of eight logical processors. Each logical processor can still only do one thing at time (more or less), but now you can have eight logical processors doing eight things simultaneously. This is possible due to the ability to take advantage of a processors speed in relation to other system components, since at any given time a processor is typically sitting idle, even when you're actively using it for a task. Analogy: ''Consider it like an assembly line at a factory. where you have multiple stages of production where workers do specific tasks, and once they are done they send what they've made down the line to another person who makes changes, so on and so forth until the product is completed. In order for the assembly line to run at full capacity, you need for each station to always have enough supplies in order to efficiently complete their task so they can send it down the line and they start on the next one. Sometimes a stage will take longer than another due to running out of parts and needing to wait to receive more, which then holds up the previous worker because they have no where to send their completed portion. This is similar to how a single-threaded processor functions, where a stage is waiting on data usually between something like the CPU and RAM (memory), the hard drive, or graphics card. It's that delay in the supply chain that a multi-threaded core exploits by having ''two workers in the next station, so now they don't have to also stop as they can send it off to the other station instead, which speeds up how many things they all can complete in the same amount of time. The operating system, on the surface, does not distinguish a "core" from a "thread" and so they are all considered to be "logical processors"; thus, for simplicity sake we just call them "processors". In reality, when the workload is light enough, such as when a program is only capable of using a couple threads simultaneously, these processors all perform the same. Yet, ideally the operating system (or the program, as they can also dictate where to send tasks) will split up the work so each "core" only has a single "thread" working at a time. Typically the logical processor to physical processor (core) affinity in Windows Task Manger is defined as logical Core0 and Core1 belong to the same physical processor. So in a four core system capable of eight threads, if you were running 4 instances of Foldit and you used only Core0, Core1, Core2, and Core3 it would only be using two physical processor cores, which is slower but will allow you to use the computer as you usually would and not notice much slowdown. However, it is ideal to assign each instance to Core0, Core2, Core4, and Core6 instead, since this will help prevent from creating the aforementioned bottleneck during processing. One Foldit client can really use only logical processor, plus a little extra for overhead. So in an eight processor machine, one client can only burn 1/8 or 12.5% of the available computing power. In theory, Foldit could use more than one processor at a time, but that's difficult with current programming technology. The issue is how to break the work up into different pieces and still keep a consistent view of the whole protein. Touching one end of the protein likely affects the other end at least slightly. Keeping things in sync across different processors is a major technical challenge -- assuming the processors are working on the same solution. Working on different solutions, it's easy to use more than one processor. Just run more than one client. Case closed. Just for the record, Intel uses the term "Hyper-Threading" to describe its SMT technology and to denote if a processor is capable of performing two-threads per core. This is generally reserved for their higher-end "Core i7" model processors and some lower end "Core i3" models (to help with performance), but has been available for many years now. AMD's first product to offer SMT are their new (2017) "Ryzen" model processors, but they have no marketing buzz-word associated with it and as a result is less consumer-friendly for determining which models are equipped with it. Currently the best way to tell is on the description by looking for "8C/16T", "6C/12T" or "4C/8T"; standing for number of Cores and Threads they have. Also an important distinction on terms is programs also have "threads", but the context is different. Program threads are like little programs-within-a-program (or sub-routines). When a Foldit client uses 100% of one processor, it's because there's one of its twelve (or more, or less) threads being very busy doing all the folding work. Here is a method for Windows (7/8/10) users to determine how many processors (threads) your CPU has: ☀http://www.dragonblogger.com/how-to-find-cpu-cores-logical-cores-on-windows-7-windows-8/ See also See Foldit Multi Client for a different view on how to set things up in Windows. Category:Tools Category:The game Category:Multi-clients Category:Linux Category:Mac Category:Windows